package com.base.logistics.jdl.bean.print;

import java.io.Serializable;
import java.util.List;

/**
 * @since 2021-02-26
 */
public class CustomAreaKeyResult  implements Serializable {

    /**
     * 资源名
     */
    private String key;

    /**
     * 资源类型（ text 文本元素 line 线条元素 rect 长方形、正方形元素 barcode 条码标记元素 image 图片标记元素 qrcode 二维码标记元素 stable 表格标记元素 ellipse 椭圆标记元素 water 水印标记元素 backgroundtext 黑底白字标记元素 ）
     */
    private String type;

    /**
     * 资源名称
     */
    private String name;

    /**
     * 表格中的元素只有资源类型是 stable 的才会有内容
     */
    private List<ColumnDo> columns;

    public CustomAreaKeyResult() {
    }

    public String getKey() {
        return this.key;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public List<ColumnDo> getColumns() {
        return this.columns;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setColumns(List<ColumnDo> columns) {
        this.columns = columns;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof CustomAreaKeyResult)) return false;
        final CustomAreaKeyResult other = (CustomAreaKeyResult) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$key = this.getKey();
        final Object other$key = other.getKey();
        if (this$key == null ? other$key != null : !this$key.equals(other$key)) return false;
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        if (this$type == null ? other$type != null : !this$type.equals(other$type)) return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$columns = this.getColumns();
        final Object other$columns = other.getColumns();
        if (this$columns == null ? other$columns != null : !this$columns.equals(other$columns)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof CustomAreaKeyResult;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $key = this.getKey();
        result = result * PRIME + ($key == null ? 43 : $key.hashCode());
        final Object $type = this.getType();
        result = result * PRIME + ($type == null ? 43 : $type.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $columns = this.getColumns();
        result = result * PRIME + ($columns == null ? 43 : $columns.hashCode());
        return result;
    }

    public String toString() {
        return "CustomAreaKeyResult(key=" + this.getKey() + ", type=" + this.getType() + ", name=" + this.getName() + ", columns=" + this.getColumns() + ")";
    }
}
